<template>
   <div class="container">
    <!-- 上一篇按钮 -->
    <button v-if="prev" @click="$emit('prev-click', prev)" class="nav-button" :title="prev.title">上一篇</button>
    <!-- 下一篇按钮 -->
    <button v-if="next" @click="$emit('next-click', next)" class="nav-button" :title="next.title">下一篇</button>
  </div>
</template>


<script setup>
const props = defineProps({
  prev: Object,
  next: Object,
  loading: Boolean
})



</script>

<style scoped>
 .container {
    display: flex;
    justify-content: space-between;
     align-items: center;
     font-family: Arial, sans-serif;
     margin:15px 0;
    width: 100%;
  }

 .nav-button {
    display: block;
    padding: 8px 16px;
    background-color: var(--card-bg-color,#ffffff);
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    text-align: center;
    color: var(--text-color,#333);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
  }

 .nav-button:hover {
    background-color: var(--article-button-bg-color,#0070f3);
    color: var(--article-detail-text-color,#ffffff);
  }

</style>
